/**
 *@program: getx_simple_code
 *@description:
 *@author: Ming
 *@create: 2024-01-12 13:33
 *@version v1.0
 */
import 'dart:ffi';

import 'package:getx_simple_code/common/apis/baseEntity.dart';
import 'package:getx_simple_code/common/utils/http.dart';
import 'package:getx_simple_code/pages/diovc/pojo/dishesEntity.dart';
import 'package:getx_simple_code/pages/diovc/pojo/dishesParam.dart';


class DishesAPIPage {
  /// 菜单列表
  static Future<DishesEntity> dishesPageList(
      {DishesParam? param}) async {
    var response = await HttpUtil().get(
      '/dish/page',
      queryParameters: param?.toJson(),
    );
    return DishesEntity.fromJson(response);
  }
  //删除菜单
  static Future<BaseEntity> dishesDelete({Records ?param}) async {

    var response = await HttpUtil().post(
      '/dish/delete',
      data: param?.toJson(),
    );
    return BaseEntity.fromJson(response);
  }
}